import lylrequest from '@/service'
import { IDataType } from '@/service/login/type'

export function getPageListData(url: string, queryInfo: any) {
  return lylrequest.post<IDataType>({
    url,
    data: queryInfo,
    showLoading: true
  })
}

// 删除数据
export function deletePageData(url: string) {
  return lylrequest.delete<IDataType>({
    url
  })
}

// 新建数据
export function createPageData(url: string, newData: any) {
  return lylrequest.post<IDataType>({
    url,
    data: newData
  })
}

// 编辑数据
export function editPageData(url: string, editData: any) {
  return lylrequest.patch<IDataType>({
    url,
    data: editData
  })
}
